import { createApp } from 'vue'
import App from './App.vue'
import 'uno.css'
import { createPinia } from "pinia";
import ElementPlus from "element-plus";
import router from "@/router"
import dayjs from "dayjs";
import FontIcon from "@/components/icon/index"
import 'animate.css/animate.min.css'
import 'element-plus/dist/index.css'
import '@/assets/index.scss'

import zhCn from 'element-plus/es/locale/lang/zh-cn'

const app = createApp(App)
app.config.globalProperties.dateAllDesc = function (data: string | number | Date | dayjs.Dayjs | null | undefined) {
    // 转时间戳
    return data ? dayjs(data).format("YYYY-MM-DD HH:mm:ss") : "";
  };
app.use(createPinia());
app.use(ElementPlus,{
  locale:zhCn
});
app.use(router);
app.component("FontIcon", FontIcon);

app.mount('#app')
